package com.maple.callback.event.boot.listener;

import java.time.LocalTime;
import java.util.concurrent.TimeUnit;

import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import com.maple.callback.event.boot.User;
import com.maple.callback.event.boot.UserRegisterEvent;

@Component
public class EmailNotifyListener {
	
	@EventListener
//	@Async
	public void register(UserRegisterEvent registerEvent){
		
		
		
		User user = registerEvent.getUser();
		LocalTime now = LocalTime.now();
		System.out.println("现在时间"+now+"---邮件监听器,监听到了注册信息，用户名："+user.getName()+"，密码："+user.getPassword());
	}
}
